<?php
echo $this->adminToolBar('newsletter', 'index', '/admin/newsletter/add/', '/admin/newsletter/edit/', '/admin/newsletter/delete/', '');
?> 
<?php         
$this->title = "NewsLetters";
$this->headTitle($this->title);
?>
<div class="mid-content" id="grid_newsletter">
    <table class="box-table-a" width="100%"> 
        <tr>
            <th scope="col" width="20%">News Letter Title</th>
            <th scope="col" width="20%">Template Title</th>
            <th scope="col" width="50%">Newsletter Content</th>
            <th scope="col" width="5%">&nbsp;</th>  
            <th scope="col" width="5%">&nbsp;</th>  
            <th scope="col" width="5%">&nbsp;</th>  
        </tr>
        <?php foreach($this->newsletter_arr as $newsletter) : ?>
        <tr>
            <td><?php echo $newsletter['newsletter_title'];?></td>
            <td><?php echo $newsletter['template_title'] ;?></td>
            <td><?php echo htmlentities(substr($newsletter['newsletter_content_en'], 0, 200));?></td>
            <td><a href="javascript: void(0);" onclick="loadPage('/admin/newsletter/listsubuser/newsletter_id/<?php echo $newsletter['newsletter_id']; ?>');" title="Send Newsletter"><img src="/images/admin/icons/envelope.png" alt=""/></a></td>
            <td><a href="javascript: void(0);" onclick="loadPage('/admin/newsletter/edit/newsletter_id/<?php echo $newsletter['newsletter_id']; ?>');" title="Edit"><img src="/images/admin/icons/edit.gif" alt=""/></a></td>
            <td><a rel="" onclick="deleteNewsletter('<?php echo $newsletter['newsletter_id'];?>')" href="javascript: void(0);"><img src="/images/admin/icons/disable.gif" alt=""/></a></td>
        </tr>
        <?php endforeach; ?>
    </table>
</div>